#ifndef MISC_GMAILCONFIGDIALOG_H
#define MISC_GMAILCONFIGDIALOG_H

#include <QDialog>
#include <QList>

class QSpinBox;
class QLineEdit;
class QTreeWidget;
class QPushButton;
class QItemSelection;

namespace GMail
{
	struct GMailTag;
	class GMailConfigDialog: public QDialog
	{
		Q_OBJECT

		public:
			GMailConfigDialog(QString& email,QList<GMailTag>& tags,int updateTime,QWidget *parent = 0);
			~GMailConfigDialog();

		private:
		    QLineEdit* emailEdit;
		    QTreeWidget* treeWidget;
		    QPushButton* addBtn;
		    QPushButton* delBtn;
		    QPushButton* okBtn;
		    QSpinBox* updateTimeSpinBox;

			QString& email;
			QList<GMailTag>& tags;
		private slots:
			void okBtnClicked();
			void delBtnClicked();
			void addBtnClicked();
			void toggleDeleteBtn(const QItemSelection& s);
	};
}
#endif // MISC_GMAILCONFIGDIALOG_H
